package split.panel;

import java.awt.BorderLayout;

import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class LogTable extends JTable {
	public LogTable() {
		super(new LogTableModel());
		getModel().insertRow(0, new String[] {"data1", "data2", "data3"});
	}
	
	   @Override
	   public LogTableModel getModel()
	   {
	      return (LogTableModel) super.getModel();
	   }

	public void append(String[] pString) {
		getModel().insertRow(0, new String[] {"data1", "data2", "data3"});
		getModel().insertRow(0, pString);
		
	}
}

class LogTableModel extends DefaultTableModel

{
	public LogTableModel() {
		super(new Object[] { "Time", "Level", "Message" }, 0);
	}

	@Override
	public boolean isCellEditable(int rowIndex, int mColIndex) {
		return false;
	}
}
